home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 26 / AACD 26.iso / AACD / Online / PHP / include / php / ext / standard / scanf.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-02-26  |  2.5 KB  |  52 lines

  1. /* 
  2.    +----------------------------------------------------------------------+
  3.    | PHP version 4.0                                                      |
  4.    +----------------------------------------------------------------------+
  5.    | Copyright (c) 1997-2001 The PHP Group                                |
  6.    +----------------------------------------------------------------------+
  7.    | This source file is subject to version 2.02 of the PHP license,      |
  8.    | that is bundled with this package in the file LICENSE, and is        |
  9.    | available at through the world-wide-web at                           |
  10.    | http://www.php.net/license/2_02.txt.                                 |
  11.    | If you did not receive a copy of the PHP license and are unable to   |
  12.    | obtain it through the world-wide-web, please send a note to          |
  13.    | license@php.net so we can mail you a copy immediately.               |
  14.    +----------------------------------------------------------------------+
  15.    | Authors: clayton collie <clcollie@mindspring.com>                    |
  16.    +----------------------------------------------------------------------+
  17. */
  18.  
  19. /* $Id: scanf.h,v 1.4 2001/02/26 06:07:23 andi Exp $ */
  20.  
  21. #ifndef  SCANF_H
  22. #define  SCANF_H
  23.  
  24.  
  25. #define SCAN_MAX_ARGS   0xFF    /* Maximum number of variable which can be      */
  26.                                 /* passed to (f|s)scanf. This is an artifical   */
  27.                                 /* upper limit to keep resources in check and   */
  28.                                 /* minimize the possibility of exploits         */
  29.  
  30. #define SCAN_MAX_FSCANF_BUFSIZE        512  /* Max input buffer allocated for fscanf */
  31. #define SCAN_SUCCESS            SUCCESS    
  32. #define SCAN_ERROR_EOF            -1    /* indicates premature termination of scan     */
  33.                                     /* can be caused by bad parameters or format*/
  34.                                     /* string.                                    */
  35. #define SCAN_ERROR_INVALID_FORMAT        (SCAN_ERROR_EOF - 1)
  36. #define SCAN_ERROR_VAR_PASSED_BYVAL        (SCAN_ERROR_INVALID_FORMAT - 1)
  37. #define SCAN_ERROR_WRONG_PARAM_COUNT    (SCAN_ERROR_VAR_PASSED_BYVAL - 1)
  38. #define SCAN_ERROR_INTERNAL             (SCAN_ERROR_WRONG_PARAM_COUNT - 1)
  39.  
  40.  
  41. /*  
  42.  * The following are here solely for the benefit of the scanf type functions
  43.  * e.g. fscanf
  44.  */
  45. PHPAPI int ValidateFormat(char *format, int numVars, int *totalVars);
  46. PHPAPI int php_sscanf_internal(char *string,char *format,int argCount,zval ***args, 
  47.                 int varStart,pval **return_value);
  48. inline void scan_set_error_return(int numVars,pval **return_value);
  49.  
  50.  
  51. #endif /* SCANF_H */
  52.